\(\int \frac {x^{-1+n} \log (\frac {x^n}{d})}{d-x^n} \, dx\) [346]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F(-2)]
   Maxima [B] (verification not implemented)
   Giac [F]
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 16 \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\frac {\operatorname {PolyLog}\left (2,1-\frac {x^n}{d}\right )}{n} \]

[Out]

polylog(2,1-x^n/d)/n

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2374, 2352} \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\frac {\operatorname {PolyLog}\left (2,1-\frac {x^n}{d}\right )}{n} \]

[In]

Int[(x^(-1 + n)*Log[x^n/d])/(d - x^n),x]

[Out]

PolyLog[2, 1 - x^n/d]/n

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2374

Int[((a_.) + Log[(c_.)*(x_)^(n_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_))^(q_.), x_Symbol] :>
 Dist[f^m/n, Subst[Int[(d + e*x)^q*(a + b*Log[c*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}
, x] && EqQ[m, r - 1] && IGtQ[p, 0] && (IntegerQ[m] || GtQ[f, 0]) && EqQ[r, n]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\log \left (\frac {x}{d}\right )}{d-x} \, dx,x,x^n\right )}{n} \\ & = \frac {\text {Li}_2\left (1-\frac {x^n}{d}\right )}{n} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.06 \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\frac {\operatorname {PolyLog}\left (2,\frac {d-x^n}{d}\right )}{n} \]

[In]

Integrate[(x^(-1 + n)*Log[x^n/d])/(d - x^n),x]

[Out]

PolyLog[2, (d - x^n)/d]/n

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.81

method result size
default \(\frac {\operatorname {dilog}\left (\frac {x^{n}}{d}\right )}{n}\) \(13\)
risch \(-\frac {\ln \left (x^{n}\right ) \ln \left (-\frac {-d +x^{n}}{d}\right )}{n}-\frac {\operatorname {dilog}\left (-\frac {-d +x^{n}}{d}\right )}{n}+\frac {\left (-\frac {i \pi \,\operatorname {csgn}\left (\frac {i}{d}\right ) \operatorname {csgn}\left (\frac {i x^{n}}{d}\right )^{2}}{2}+\frac {i \pi \,\operatorname {csgn}\left (\frac {i}{d}\right ) \operatorname {csgn}\left (\frac {i x^{n}}{d}\right ) \operatorname {csgn}\left (i x^{n}\right )}{2}+\frac {i \pi \operatorname {csgn}\left (\frac {i x^{n}}{d}\right )^{3}}{2}-\frac {i \pi \operatorname {csgn}\left (\frac {i x^{n}}{d}\right )^{2} \operatorname {csgn}\left (i x^{n}\right )}{2}+\ln \left (d \right )\right ) \ln \left (-d +x^{n}\right )}{n}\) \(147\)

[In]

int(x^(n-1)*ln(x^n/d)/(d-x^n),x,method=_RETURNVERBOSE)

[Out]

1/n*dilog(x^n/d)

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (15) = 30\).

Time = 0.30 (sec) , antiderivative size = 50, normalized size of antiderivative = 3.12 \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=-\frac {n \log \left (x\right ) \log \left (\frac {d - x^{n}}{d}\right ) + \log \left (-d + x^{n}\right ) \log \left (\frac {1}{d}\right ) + {\rm Li}_2\left (-\frac {d - x^{n}}{d} + 1\right )}{n} \]

[In]

integrate(x^(-1+n)*log(x^n/d)/(d-x^n),x, algorithm="fricas")

[Out]

-(n*log(x)*log((d - x^n)/d) + log(-d + x^n)*log(1/d) + dilog(-(d - x^n)/d + 1))/n

Sympy [F(-2)]

Exception generated. \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\text {Exception raised: TypeError} \]

[In]

integrate(x**(-1+n)*ln(x**n/d)/(d-x**n),x)

[Out]

Exception raised: TypeError >> Invalid comparison of non-real zoo

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 45 vs. \(2 (15) = 30\).

Time = 0.30 (sec) , antiderivative size = 45, normalized size of antiderivative = 2.81 \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\frac {\log \left (d\right ) \log \left (-d + x^{n}\right )}{n} - \frac {\log \left (x^{n}\right ) \log \left (-\frac {x^{n}}{d} + 1\right ) + {\rm Li}_2\left (\frac {x^{n}}{d}\right )}{n} \]

[In]

integrate(x^(-1+n)*log(x^n/d)/(d-x^n),x, algorithm="maxima")

[Out]

log(d)*log(-d + x^n)/n - (log(x^n)*log(-x^n/d + 1) + dilog(x^n/d))/n

Giac [F]

\[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\int { \frac {x^{n - 1} \log \left (\frac {x^{n}}{d}\right )}{d - x^{n}} \,d x } \]

[In]

integrate(x^(-1+n)*log(x^n/d)/(d-x^n),x, algorithm="giac")

[Out]

integrate(x^(n - 1)*log(x^n/d)/(d - x^n), x)

Mupad [B] (verification not implemented)

Time = 0.40 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.75 \[ \int \frac {x^{-1+n} \log \left (\frac {x^n}{d}\right )}{d-x^n} \, dx=\frac {{\mathrm {Li}}_{\mathrm {2}}\left (\frac {x^n}{d}\right )}{n} \]

[In]

int((x^(n - 1)*log(x^n/d))/(d - x^n),x)

[Out]

dilog(x^n/d)/n